<div class="status-line">
  @if (isStatusKnown()) {
    @switch (status()) {
      @case (DriveBayLightStatus.On) {
        <ix-icon name="mdi-lightbulb-on"></ix-icon>
        {{ 'Identify light is on.' | translate }}
      }
      @case (DriveBayLightStatus.Clear) {
        <ix-icon name="mdi-lightbulb-off-outline"></ix-icon>
        {{ 'Identify light is off.' | translate }}
      }
      @case (DriveBayLightStatus.Off) {
        <ix-icon name="mdi-lightbulb-off-outline"></ix-icon>
        {{ 'Identify light is off.' | translate }}
      }
    }
  } @else {
    <ix-icon name="mdi-lightbulb-question-outline"></ix-icon>
    {{ 'Light status is unknown.' | translate }}
  }
</div>

<div class="controls">
  @if (status() === DriveBayLightStatus.Off || status() === DriveBayLightStatus.Clear || !isStatusKnown()) {
    <button
      mat-button
      ixTest="identify"
      (click)="changeLightStatus(DriveBayLightStatus.On)"
    >{{ 'Identify' | translate }}</button>
  }
  @if ((status() !== DriveBayLightStatus.Off && status() !== DriveBayLightStatus.Clear) || !isStatusKnown()) {
    <button
      mat-button
      ixTest="turn-off"
      (click)="changeLightStatus(DriveBayLightStatus.Off)"
    >{{ 'Turn Off' | translate }}</button>
  }
</div>
